<template>
  <el-form :model="ProductAdd" class="demo-form-inline" label-width="120px">
    <el-row>
      <el-col :span="12">
        <el-form-item label="产品名称" prop="name">
          <el-input v-model="ProductAdd.name" placeholder="请输入产品名称" />
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="业务类型" prop="businessType">
          <el-select v-model="ProductAdd.businessType" placeholder="请选择业务类型" style="width: 100%;">
             <el-option v-for="item in BusinessTypeList" :key="item.value" :label="item.label" :value="item.value"/>
          </el-select>
        </el-form-item>
      </el-col>
    </el-row>
    <el-row>
      <el-col :span="24">
        <el-form-item label="标题" prop="title">
          <el-input v-model="ProductAdd.title" placeholder="请输入标题" />
        </el-form-item>
      </el-col>
    </el-row>
    <el-row>
      <el-col :span="24">
        <el-form-item label="正文" prop="content">
          <vue-ueditor-wrap v-model="msg" :config="editorConfig" editor-id="editor" style="width: 100%;" >
          </vue-ueditor-wrap>
        </el-form-item>
      </el-col>
    </el-row>
  </el-form>
</template>

<script setup lang="ts">
defineProps({
  BusinessTypeList:{
    type: Array<any>,
    required: true
  }
})
import { reactive,ref } from 'vue';
const msg = ref("")
const editorConfig = ref({
      UEDITOR_HOME_URL: '/UEditor/', // 访问 UEditor 静态资源的根路径，可参考常见问题1
      serverUrl: '/upload/ufile?action=config&&noCache=1699087544815', // 服务端接口
    })
const ProductAdd = reactive({
  name: "",
  businessType: "",
  title: ""
})
</script>

<style scoped></style>